package com.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.mybatisplus.annotaion.AutoLazy;
import com.mybatisplus.annotaion.JoinColumn;
import com.mybatisplus.annotaion.Lazy;
import com.mybatisplus.annotaion.ManyToOne;
import lombok.Data;

import java.io.Serializable;

@Data
@AutoLazy
public class Student implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String  name;

    private Integer cid;

    @TableField(exist = false)
    @ManyToOne
    @JoinColumn(name = "cid",referencedColumnName = "id")
    @Lazy(true)
    private Clss clss;

}
